
function [margin] = Margin_t(x)
    sorted_data_desc = sort(x, 'descend');
    disp(sorted_data_desc); % 输出: [9, 7, 5, 2, 1]
    margin = sorted_data_desc(1)-sorted_data_desc(2);
end